import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'

//全局css
import './assets/css/gloab.css'
import './assets/font/iconfont.css'

import { request } from './request/request'
// request('https://jsonplaceholder.typicode.com/posts1',res=>{
//   console.log(res);
// },err=>{
//   console.log(err);
// })
// -------------------------------------------
// request({
//   url: 'posts',
//   success: res=>{
//     console.log(res);
//   },
//   fail: err=>{
//     console.log(err);
//   }
// })
// -------------------------------------------
request('posts')
.then(res=>{
  console.log(res);
}).catch(err=>{
  console.log(err);
})

Vue.config.productionTip = false

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
